package com.trkj.pojo;

import java.io.Serializable;
import javax.persistence.*;

import com.alibaba.fastjson.annotation.JSONField;

import java.math.BigDecimal;
import java.sql.Timestamp;
import java.util.List;


/**
 * The persistent class for the ATTENDANCECENTER database table.
 * 
 */
@Entity
@NamedQuery(name="Attendancecenter.findAll", query="SELECT a FROM Attendancecenter a")
public class Attendancecenter implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@SequenceGenerator(name="ATTENDANCECENTER_ATTCENID_GENERATOR", sequenceName="HR")
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="ATTENDANCECENTER_ATTCENID_GENERATOR")
	@Column(name="ATTCEN_ID")
	private long attcenId;

	@Column(name="ATTCEN_ENDDATE")
	private Timestamp attcenEnddate;

	@Column(name="ATTCEN_ENDUPDATE")
	private Timestamp attcenEndupdate;

	@Column(name="ATTCEN_FOUNDDATE")
	private Timestamp attcenFounddate;

	@Column(name="ATTCEN_PERSON")
	private String attcenPerson;

	@Column(name="ATTCEN_REASON")
	private String attcenReason;

	@Column(name="ATTCEN_REMARKS")
	private String attcenRemarks;

	@Column(name="ATTCEN_STARTDATE")
	private Timestamp attcenStartdate;

	@Column(name="ATTCEN_STATE")
	private BigDecimal attcenState;

	@Column(name="ATTCEN_UPDATE")
	private Timestamp attcenUpdate;

	//bi-directional many-to-one association to Timecard
	@ManyToOne
	@JoinColumn(name="TIMECARD_ID")
	private Timecard timecard;

	//bi-directional many-to-one association to StaffInformation
	@OneToMany(mappedBy="attendancecenter")
	@JSONField(serialize=false)
	private List<StaffInformation> staffInformations;

	public Attendancecenter() {
	}

	public long getAttcenId() {
		return this.attcenId;
	}

	public void setAttcenId(long attcenId) {
		this.attcenId = attcenId;
	}

	public Timestamp getAttcenEnddate() {
		return this.attcenEnddate;
	}

	public void setAttcenEnddate(Timestamp attcenEnddate) {
		this.attcenEnddate = attcenEnddate;
	}

	public Timestamp getAttcenEndupdate() {
		return this.attcenEndupdate;
	}

	public void setAttcenEndupdate(Timestamp attcenEndupdate) {
		this.attcenEndupdate = attcenEndupdate;
	}

	public Timestamp getAttcenFounddate() {
		return this.attcenFounddate;
	}

	public void setAttcenFounddate(Timestamp attcenFounddate) {
		this.attcenFounddate = attcenFounddate;
	}

	public String getAttcenPerson() {
		return this.attcenPerson;
	}

	public void setAttcenPerson(String attcenPerson) {
		this.attcenPerson = attcenPerson;
	}

	public String getAttcenReason() {
		return this.attcenReason;
	}

	public void setAttcenReason(String attcenReason) {
		this.attcenReason = attcenReason;
	}

	public String getAttcenRemarks() {
		return this.attcenRemarks;
	}

	public void setAttcenRemarks(String attcenRemarks) {
		this.attcenRemarks = attcenRemarks;
	}

	public Timestamp getAttcenStartdate() {
		return this.attcenStartdate;
	}

	public void setAttcenStartdate(Timestamp attcenStartdate) {
		this.attcenStartdate = attcenStartdate;
	}

	public BigDecimal getAttcenState() {
		return this.attcenState;
	}

	public void setAttcenState(BigDecimal attcenState) {
		this.attcenState = attcenState;
	}

	public Timestamp getAttcenUpdate() {
		return this.attcenUpdate;
	}

	public void setAttcenUpdate(Timestamp attcenUpdate) {
		this.attcenUpdate = attcenUpdate;
	}

	public Timecard getTimecard() {
		return this.timecard;
	}

	public void setTimecard(Timecard timecard) {
		this.timecard = timecard;
	}

	public List<StaffInformation> getStaffInformations() {
		return this.staffInformations;
	}

	public void setStaffInformations(List<StaffInformation> staffInformations) {
		this.staffInformations = staffInformations;
	}

	public StaffInformation addStaffInformation(StaffInformation staffInformation) {
		getStaffInformations().add(staffInformation);
		staffInformation.setAttendancecenter(this);

		return staffInformation;
	}

	public StaffInformation removeStaffInformation(StaffInformation staffInformation) {
		getStaffInformations().remove(staffInformation);
		staffInformation.setAttendancecenter(null);

		return staffInformation;
	}

}